import http from "./http";
// 登录请求
export const reqLogin = (data) => {
	return http.post("/get/token", data, false, "登录中...");
};
// 免登录请求
export const reqFreePsw = (data) => {
	return http.post("/no_password_login", data, false, "登录中...");
};
// 获取身份信息
export const getUserInfo = (params) => {
	return http.get("/me", params, true, "加载中...");
};
//请求区域列表
export const getIrriAreaList = (data) => {
	return http.get("/gg_area", data, true, "加载中...");
};
//控制箱列表 do
export const getIrriCtrlboxDoList = (params) => {
	return http.get("/gg_device_dolist", params, true, "加载中...");
};
//电磁阀控制
export const setDeviceDtuControl = (data) => {
	return http.post("/v1/dtu_control?login_type=1", data, true, "加载中...");
};
//历史数据
export const getDevHistoryData = (params) => {
	return http.get("/monitor_data", params, true, "加载中...");
};
//图表曲线
export const getbigscreenEcharts = (params) => {
	return http.get("/monitor_quxiantu", params, true, "加载中...");
};
//修改密码
export const editPwd = (data) => {
	return http.post(
		"/v1/edit_my_password?login_type=1",
		data,
		true,
		"加载中..."
	);
};